Question answering method and device, electronic equipment, medium and program product
By using the first largest language model set that does not perform value outflow processing to generate problem association information and prompt information, the problem of semantic ambiguity of user input problems and insufficient natural language processing capabilities is solved, efficient and accurate question responses are achieved, and the cost of model usage is reduced.
Patent Information
- Application Number
- CN202411629934.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-11
AI Technical Summary
The problems with user input may have semantic ambiguity, or the natural language processing capabilities of large language models are poor, making it difficult to accurately understand the semantics of the problem, requiring multiple rounds of interaction, which is inefficient and wastes model usage costs.
The first pre-trained language model set is used to generate problem association information and prompt information, and preliminary information supplement and prompt generation are performed through the own large language model that does not perform value outflow processing, reducing the cost of subsequent model use. Then, a large language model that performs value outflow processing generates the question response information.
On the basis of less value outflow, high-quality prompt information is generated to improve the efficiency and accuracy of question responses and reduce the cost of model use.
Smart Images

Figure CN119597878A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of large language model applications, and in particular to question answering methods, devices, electronic devices, media, and program products. Background Art
[0002] At present, with the advent of the era of artificial intelligence, the application of large language models is becoming more and more widespread in people's daily lives. For the question answering based on the large language model, the method usually adopted is: the user directly inputs the question into the large language model, and the large language model outputs the answer content.
[0003] However, the inventors have found that when the above method is adopted, the following technical problems often occur:
[0004] The questions entered by users may contain semantic ambiguity or the natural language processing capabilities of the large language model may be poor, which makes it difficult for the large language model to accurately understand the semantics of the questions. Therefore, multiple rounds of interaction with the large language model are required, which not only has low interaction efficiency, but also wastes a lot of model usage costs of the large language model.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] Some embodiments of the present disclosure propose question answering methods, devices, electronic devices, media, and program products to solve the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a question answering method, including: obtaining a model input question corresponding to a target user; using a pre-trained first large language model set to generate question association information corresponding to the model input question, wherein the first large language model is a proprietary large language model that does not perform value outflow processing during use; based on the model input question and the question association information, using the first large language model set to generate prompt information corresponding to the model input question; using a pre-trained second large language model set to generate question answer information corresponding to the prompt information, wherein the second large language model is a large language model that performs value outflow processing during use.
[0009] Optionally, the above-mentioned generating prompt information corresponding to the above-mentioned model input question based on the above-mentioned model input question and the above-mentioned question-related information using the above-mentioned first largest language model set includes: determining the question intent corresponding to the above-mentioned model input question; in response to determining that the intent confidence corresponding to the above-mentioned question intent is higher than a target value, generating prompt information corresponding to the above-mentioned model input question based on the above-mentioned model input question, the above-mentioned question intent and the above-mentioned question-related information using the above-mentioned first largest language model set.
[0010] Optionally, the method further includes: in response to determining that the intent confidence is lower than or equal to the target value, using the first large language model set to determine, through large language model interaction, the intent description information of the user's reply corresponding to the question intent; based on the intent description information, adjusting the question intent to generate an actual question intent; in response to determining that the intent confidence corresponding to the actual question intent is higher than the target value, generating prompt information corresponding to the model input question based on the model input question, the actual question intent and the question association information using the first large language model set.
[0011] Optionally, the above-mentioned question-related information includes: question context information; and the above-mentioned use of the pre-trained first large language model set to generate the question-related information corresponding to the above-mentioned model input question, including: using the above-mentioned first large language model set to generate the question context information corresponding to the above-mentioned model input question through a large language model interaction method.
[0012] Optionally, the above-mentioned question-related information also includes: question domain information and user role information; and the above-mentioned use of the pre-trained first large language model set to generate the question-related information corresponding to the above-mentioned model input question includes: determining the above-mentioned question domain information according to the above-mentioned question intent; generating the above-mentioned user role information through the interaction of the large language model according to the above-mentioned question context information and the above-mentioned model input question.
[0013] Optionally, the above-mentioned question-related information also includes: key slot optimization information; and the above-mentioned use of the pre-trained first largest language model set to generate the question-related information corresponding to the above-mentioned model input question, including: determining the key slot information corresponding to the above-mentioned model input question; according to the above-mentioned question context information and the above-mentioned question intent, using the above-mentioned first largest language model set to optimize the content of the above-mentioned key slot information to generate key slot optimization information.
[0014] Optionally, the above-mentioned generating prompt information corresponding to the above-mentioned model input problem based on the above-mentioned model input problem and the above-mentioned problem association information using the above-mentioned first large language model set includes: screening out at least one first large language model corresponding to the above-mentioned problem domain information and the above-mentioned user role information from the above-mentioned first large language model set; generating prompt generation information for the above-mentioned model input problem, the above-mentioned problem intent, the above-mentioned problem context information, the above-mentioned problem domain information, the above-mentioned user role information and the above-mentioned key slot optimization information; and inputting the above-mentioned prompt generation information into the above-mentioned at least one first large language model to generate the above-mentioned prompt information.
[0015] Optionally, after generating prompt information corresponding to the model input question based on the model input question and the question association information using the first large language model set, the method further includes: generating prompt evaluation information corresponding to the prompt information using a pre-trained prompt information evaluation model; in response to determining that the prompt evaluation information does not meet preset evaluation conditions, optimizing the content of the prompt information using the prompt information evaluation model to generate first prompt optimization content; and determining the first prompt optimization content as the prompt information.
[0016] Optionally, after generating prompt information corresponding to the model input question based on the model input question and the question association information using the first large language model set, the method further includes: determining a corresponding prompt information template based on the question domain information and the question intent; optimizing the content of the prompt information based on the prompt information template to generate second prompt optimization content; and determining the second prompt optimization content as the prompt information.
[0017] Optionally, in response to determining that the prompt evaluation information does not meet the preset evaluation conditions, after optimizing the prompt information using the prompt information evaluation model to generate the first prompt optimization content, the method further includes: determining the prompt optimization content evaluation information corresponding to the first prompt optimization content; in response to determining that the prompt optimization content evaluation information does not meet the target evaluation conditions, supplementing the question content of the model input question using the first large language model set through the large language model interaction to obtain the supplemented question content; generating a third prompt optimization content based on the supplemented question content; and determining the third prompt optimization content as the first prompt optimization content.
[0018] Optionally, the obtaining of the model input question corresponding to the target user includes: utilizing a pre-installed intelligent prompt information optimization plug-in to obtain the model input question corresponding to the target user.
[0019] In a second aspect, some embodiments of the present disclosure provide a question answering device, including: an acquisition unit, configured to acquire a model input question corresponding to a target user; a first generation unit, configured to generate question-related information corresponding to the model input question using a pre-trained first large language model set, wherein the first large language model is a proprietary large language model that does not perform value outflow processing during use; a second generation unit, configured to generate prompt information corresponding to the model input question using the first large language model set based on the model input question and the question-related information; a third generation unit, configured to generate question answer information corresponding to the prompt information using a pre-trained second large language model set, wherein the second large language model is a large language model that performs value outflow processing during use.
[0020] Optionally, the second generation unit can be configured to: determine the question intent corresponding to the above-mentioned model input question; in response to determining that the intent confidence corresponding to the above-mentioned question intent is higher than the target value, based on the above-mentioned model input question, the above-mentioned question intent and the above-mentioned question association information, generate prompt information corresponding to the above-mentioned model input question using the above-mentioned first large language model set.
[0021] Optionally, the second generation unit can be configured to: in response to determining that the above-mentioned intention confidence is lower than or equal to the above-mentioned target value, using the above-mentioned first large language model set, through the interaction of the large language model, determine the intention description information of the user's reply corresponding to the above-mentioned question intent; according to the above-mentioned intention description information, adjust the intention of the above-mentioned question intent to generate the actual question intent; in response to determining that the intention confidence corresponding to the above-mentioned actual question intent is higher than the above-mentioned target value, based on the above-mentioned model input question, the above-mentioned actual question intent and the above-mentioned question association information, generate the prompt information corresponding to the above-mentioned model input question using the above-mentioned first large language model set.
[0022] Optionally, the above-mentioned question-related information includes: question context information; and the first generation unit can be configured to: use the above-mentioned first large language model set to generate question context information corresponding to the above-mentioned model input question through large language model interaction.
[0023] Optionally, the above-mentioned question-related information also includes: question domain information and user role information; and the first generating unit can be configured to: determine the above-mentioned question domain information according to the above-mentioned question intention; generate the above-mentioned user role information through the interaction of the large language model according to the above-mentioned question context information and the above-mentioned model input question.
[0024] Optionally, the above-mentioned question-related information also includes: key slot optimization information; and the first generation unit can be configured to: determine the key slot information corresponding to the above-mentioned model input question; according to the above-mentioned question context information and the above-mentioned question intent, use the above-mentioned first large language model set to optimize the content of the above-mentioned key slot information to generate key slot optimization information.
[0025] Optionally, the second generation unit can be configured to: filter out at least one first large language model corresponding to the problem domain information and the user role information from the first large language model set; generate prompt generation information for the model input question, the question intent, the question context information, the problem domain information, the user role information and the key slot optimization information; input the prompt generation information into the at least one first large language model to generate the prompt information.
[0026] Optionally, the device also includes: using a pre-trained prompt information evaluation model to generate prompt evaluation information corresponding to the above prompt information; in response to determining that the above prompt evaluation information does not meet the preset evaluation conditions, using the above prompt information evaluation model to optimize the content of the above prompt information to generate first prompt optimization content; and determining the above first prompt optimization content as the prompt information.
[0027] Optionally, the device also includes: determining a corresponding prompt information template according to the above-mentioned problem domain information and the above-mentioned problem intention; optimizing the content of the above-mentioned prompt information according to the above-mentioned prompt information template to generate a second prompt optimization content; and determining the above-mentioned second prompt optimization content as the prompt information.
[0028] Optionally, the device also includes: determining prompt optimization content evaluation information corresponding to the above-mentioned first prompt optimization content; in response to determining that the above-mentioned prompt optimization content evaluation information does not meet the above-mentioned target evaluation conditions, using the above-mentioned first large language model set, through the large language model interaction method, supplementing the question content of the above-mentioned model input question to obtain the supplemented question content; generating a third prompt optimization content according to the above-mentioned supplemented question content; and determining the above-mentioned third prompt optimization content as the first prompt optimization content.
[0029] Optionally, the acquisition unit may be configured to: utilize a pre-installed intelligent prompt information optimization plug-in to acquire a model input question corresponding to the target user.
[0030] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0031] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0032] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which implements the method described in any implementation manner in the above-mentioned first aspect when executed by a processor.
[0033] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the question answering model method of some embodiments of the present disclosure, on the basis of less value outflow, high-quality prompt information is accurately generated through the first large language model set, and the question answering information corresponding to the prompt information is accurately and efficiently generated through the second large language model set. Specifically, the reason for the low efficiency of the relevant question answering and the high cost of model use is that the question input by the user may have semantic ambiguity or the natural language processing ability corresponding to the large language model is poor, which makes it difficult for the large language model to accurately understand the question semantics of the question. Therefore, it is necessary to interact with the large language model for multiple rounds, which not only has low interaction efficiency, but also wastes a lot of model use costs of the large language model. Based on this, the question answering method of some embodiments of the present disclosure first obtains the model input question corresponding to the target user to preliminarily obtain the question that the target user needs to answer. Then, using the pre-trained first large language model set, the question association information corresponding to the above model input question can be accurately generated. Among them, the first large language model is a self-owned large language model that does not perform value outflow processing during use. Here, through the first largest language model set that does not need to perform value outflow processing operations, the problem-related information corresponding to the model input problem can be preliminarily supplemented to avoid the problem of semantic ambiguity in the model input problem. In addition, by using the first largest language model set, the problem-related information can be preliminarily supplemented at a low model usage cost. Then, according to the above-mentioned model input problem and the above-mentioned problem-related information, the above-mentioned first largest language model set can be used to generate high-quality prompt information corresponding to the above-mentioned model input problem. In addition, by using the first largest language model set to generate problem-related information and prompt information, the subsequent second largest language model set can avoid the occurrence of poor natural language processing capabilities, and ensure that the second largest language model set generates accurate reply content based on the prompt information. Finally, using the pre-trained second largest language model set, the question reply information corresponding to the above prompt information can be accurately generated. Among them, the second largest language model is a large language model that performs value outflow processing during use. In summary, by using the first largest language model set that does not require value outflow processing to generate question-related information to supplement the model input question (i.e., generate question-related information) and generate high-quality prompt information, the second largest language model set can be used to accurately identify the question semantics corresponding to the model input question on the basis of less value outflow, so as to accurately generate question answer information. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0035] Figure 1 is a schematic diagram of an application scenario of the question answering method according to some embodiments of the present disclosure;
[0036] Figure 2 is a flow chart of some embodiments of the question answering method according to the present disclosure;
[0037] Figure 3 are flow charts of other embodiments of the question answering method according to the present disclosure;
[0038] Figure 4 is a schematic diagram of clarifying the focus of supplementary questions based on the first large language model set in some embodiments of the question answering method disclosed in the present invention;
[0039] Figure 5 is a schematic diagram of the structure of some embodiments of the question answering device according to the present disclosure;
[0040] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0041] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0042] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0043] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0044] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0045] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0046] With regard to the collection, storage, and use of user personal information (such as model input issues) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subject, and obtaining the authorization and consent of the personal information subject in advance.
[0047] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0048] Figure 1 It is a schematic diagram of an application scenario of the question answering method according to some embodiments of the present disclosure.
[0049] exist Figure 1 In the application scenario, first, the electronic device 101 can obtain the model input question 102 corresponding to the target user. In this application scenario, the model input question 102 can be "How to travel to Xinjiang". Then, the electronic device 101 can use the pre-trained first large language model set 104 to generate the question-related information 103 corresponding to the above model input question 102. Among them, the first large language model is a self-owned large language model that does not perform value outflow processing during use. In this application scenario, the first large language model set 104 may include: the first large language model A, the first large language model B and the first large language model C. The question-related information 103 can be "Take the high-speed rail to travel to Xinjiang" and "Xinjiang specialties: dates, raisins". Then, the electronic device 101 can use the above-mentioned first large language model set 104 according to the above-mentioned model input question 102 and the above-mentioned question-related information 103 to generate the prompt information 105 corresponding to the above-mentioned model input question 102. In this application scenario, finally, the electronic device 101 can use the pre-trained second largest language model set 106 to generate the question answer information 107 corresponding to the above prompt information 105. Among them, the second largest language model is a large language model that performs value outflow processing during use. In this application scenario, the second largest language model set 106 may include: the second largest language model A, the second largest language model B, and the second largest language model C. The question answer information 107 can be "High-speed rail Z**3 goes to Xinjiang", "Go to eat dates and raisins".
[0050] It should be noted that the electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0051] It should be understood that Figure 1 The number of electronic devices in the embodiment is only for illustration. Any number of electronic devices may be provided according to implementation requirements.
[0052] Continue to refer Figure 2 , shows a process 200 of some embodiments of the question answering method according to the present disclosure. The question answering method comprises the following steps:
[0053] Step 201, obtaining the model input question corresponding to the target user.
[0054] In some embodiments, the execution subject of the above question answering method (for example Figure 1 The electronic device 101 shown can obtain the model input question corresponding to the target user through a wired connection or a wireless connection. The target user can be a user who asks the model input question. The model input question can be a question input by the target user into the large language model. In practice, the model input question can be a question input on the input page corresponding to the large language model. For example, the model input question can be "How to travel to Xinjiang".
[0055] In some optional implementations of some embodiments, the above-mentioned execution entity can use a pre-installed intelligent prompt information optimization plug-in to obtain the model input problem corresponding to the target user. Among them, the intelligent prompt information optimization plug-in supports the interception of the input problem corresponding to the target user and the optimization of the prompt information corresponding to the large language model. Here, the intelligent prompt information optimization plug-in can be pre-installed by the execution entity corresponding to the large language model system. The intelligent prompt information optimization plug-in can be a plug-in pre-developed based on various development languages and connected to the same large language model system gateway. The intelligent prompt information optimization plug-in can be a plug-in of the plug-in type.
[0056] Step 202, using the pre-trained first large language model set, generates question association information corresponding to the above model input question.
[0057] In some embodiments, the execution subject may generate the problem-related information corresponding to the model input question using the pre-trained first large language model set. Among them, each of the first large language models in the first large language model set may be a large language model with different model structures, model expertise, etc. The first large language model may be a self-owned large language model that does not perform value outflow processing during use. That is, the first large language model may be a self-owned large language model that does not require value payment during use. In practice, the value outflow processing may be the value outflow of model-related resources. For example, the value outflow processing may be the cost of use required to use the large language model. That is, the first large language model may be a large language model that does not require payment for use. The problem-related information may be information related to the semantic content of the problem corresponding to the model input problem. In practice, the problem-related information may include but is not limited to at least one of the following: questions similar to the model input question, the answer content of similar questions, and question field inquiry information related to the model input question.
[0058] As an example, first, the execution subject may generate the associated prompt information corresponding to the model input question. Then, the associated prompt information is input into each of the first largest language models in the first largest language model set to generate each output information. Finally, each of the information in each output information is aggregated and associated to generate question-related information. The associated prompt information may be a prompt word (Prompt) that represents the generation of question information related to the model input question.
[0059] In some optional implementations of some embodiments, the above-mentioned question-related information includes: question context information. Question context information can be context content that is semantically related to the question content of the model input question. Among them, context content refers to environmental information that is closely related before and after in the text. Context content includes words, sentences, paragraphs, etc. Understanding and applying context content is the key to reading comprehension, which can help understand the user's question intention, infer the meaning of question words, etc.
[0060] Optionally, the first large language model set is used to generate question context information corresponding to the model input question through large language model interaction.
[0061] As an example, first, generation prompt information representing generation question context information is generated. Then, the generation prompt information is input into any first large language model to generate question context information through the large language model interaction.
[0062] In some optional implementations of some embodiments, the above-mentioned problem association information also includes: problem domain information and user role information. Among them, the problem domain information may be the problem domain involved in the model input problem. For example, for the model input problem of "How to travel to Xinjiang", the corresponding problem domain information may be the tourism field. User role information may be role information of the role played by the target user who raises the model input question. The problem domain information may be domain description information of the problem domain. For example, the problem domain information may be a domain identifier. The user role information may be role description information of the user role. For example, the user role information may be a role identifier.
[0063] For another example, the corresponding user role information may be one of the following:
[0064] Role 1 (e.g. domain expert): Focuses on in-depth knowledge in a specific field and provides highly professional answers.
[0065] Role 2 (e.g. data analyst): focuses on analyzing and processing data, providing insights and conclusions based on the data.
[0066] Role three (e.g. idea generator): responsible for generating creative and innovative solutions and providing diverse ideas and solutions.
[0067] Optionally, the execution subject may use the pre-trained first largest language model set to generate question association information corresponding to the model input question, including the following steps:
[0068] The first step is to determine the above problem domain information based on the above problem intent.
[0069] As an example, the execution subject may determine the question domain information corresponding to the question intent through a preset domain matching rule, wherein the domain matching rule may be a rule set or generated by a relevant expert or a large language model.
[0070] As another example, first, domain generation prompt information is generated to represent the problem domain information determined according to the problem intention, and then the domain generation prompt information is input into any first language model to generate the problem domain information.
[0071] In the second step, based on the question context information and the model input question, the user role information is generated through interaction with a large language model.
[0072] As an example, first, a character generation prompt information of the user role information is determined according to the question context information and the model input question, and then the role generation prompt information is input into any first language model to generate the user role information.
[0073] In some optional implementations of some embodiments, the above-mentioned problem-related information further includes: key slot optimization information. The key slot optimization information may be information after optimizing the slot content of the key slot in the model input problem.
[0074] Optionally, the execution subject may use the pre-trained first largest language model set to generate question association information corresponding to the model input question, including the following steps:
[0075] The first step is to determine the key slot information corresponding to the above model input problem.
[0076] As an example, the above execution entity can use the key slot content extraction model to extract key slot information from the model input problem.
[0077] In the second step, based on the question context information and the question intent, the first language model set is used to optimize the key slot information to generate key slot optimization information.
[0078] As an example, first, the execution subject may generate contextual prompt information representing the contextual information of the generated question, and then input the contextual prompt information into any first large language model to generate the contextual information of the question through the interaction of the large language model.
[0079] Step 203: Based on the model input question and the question association information, using the first large language model set, generate prompt information corresponding to the model input question.
[0080] In some embodiments, the execution subject may generate prompt information corresponding to the model input question using the first large language model set based on the model input question and the question association information, wherein the prompt information may be a prompt word representing the content of the answer to the generated model input question.
[0081] As an example, first, prompt generation information for the model input question is generated based on the above-mentioned type input question and the above-mentioned question association information. Then, a first large language model is randomly selected from the first large language model set as the target large language model. Finally, the prompt generation information is input into the target large language model to generate prompt information. The prompt generation information can be prompt information for generating a prompt word for replying to the model input question based on the question association information.
[0082] In some optional implementations of some embodiments, the execution subject may generate prompt information corresponding to the model input question using the first large language model set according to the model input question and the question association information, including the following steps:
[0083] The first step is to determine the question intent corresponding to the above model input question. The question intent can be the content intent of the main inquiry content corresponding to the model input question. For example, for the model input question "How to travel to Xinjiang", the corresponding question intent can be the travel planning inquiry intent.
[0084] As an example, first, the above-mentioned execution entity can perform text preprocessing on the model input question to obtain the preprocessed result. Among them, text preprocessing may include but is not limited to at least one of the following: word segmentation processing, stop word removal processing, and stem extraction processing. Then, the preprocessed result is input into a word vector conversion model (for example, Word2Vec model, GloVe model, BERT model) to generate a style vector. Finally, the above text vector is input into a pre-trained intent classification model to generate the question intent. In practice, the intent classification model can be but is not limited to one of the following: Support Vector Machine (SVM), random forest, deep neural network.
[0085] It should be noted that in the process of question intent identification, named entity recognition technology will be used to extract key information.
[0086] In the second step, in response to determining that the intent confidence corresponding to the question intent is higher than the target value, based on the model input question, the question intent and the question association information, the first largest language model set is used to generate prompt information corresponding to the model input question. The target value may be a predetermined value. For example, the target value may be set based on the experience of relevant experts, or may be generated based on model training. The intent confidence may characterize the accuracy of generating the question intent. That is, the intent confidence may be information in numerical form. The larger the value, the more accurate the characterization of the question intent. The intent confidence may be a value that is consistent with the question intent. Figure 1 Generated by the intent classification model, the prompt information corresponding to the model input question can be a prompt word representing the answer to the model input question.
[0087] As an example, first, the execution subject may generate prompt word generation information for generating prompt words based on the model input question, the question intent, and the question association information. Then, the prompt word generation information is input into any first language model in the first language model set to generate prompt information corresponding to the model input question.
[0088] In some optional implementations of some embodiments, the steps further include:
[0089] In the first step, in response to determining that the above-mentioned intent confidence is lower than or equal to the above-mentioned target value, the intent description information of the user's answer corresponding to the above-mentioned question intent is determined by using the above-mentioned first large language model set through the large language model interaction method. Among them, the large language model interaction method can be a question-and-answer interaction method with the large language model. The intent description information can be information that further describes the question intent after the user answers.
[0090] As an example, first, the execution subject may randomly select the first language model from the first language model set to obtain the selected language model. Then, the selected language model is used to generate the intent supplement information that represents the description and supplement of the question intent. Next, the intent supplement information is displayed on the interactive interface corresponding to the selected language model, so that the target user can supplement the intent supplement information and obtain the intent description information.
[0091] The second step is to adjust the question intent according to the above intention description information to generate an actual question intent, wherein the actual question intent may be a question intent with higher accuracy and richer content than the corresponding intent of the question intent.
[0092] As an example, the above-mentioned execution entity can fuse the intent description information and the question intent to generate the actual question intent.
[0093] As another example, first, the execution subject may generate prompt information for intent generation based on the intent description information and the question intent. The intent generation prompt information may be prompt information for generating the actual question intent. Then, the intent generation prompt information is input into any of the first largest language models in the first largest language model set to generate the actual question intent.
[0094] In the third step, in response to determining that the intent confidence corresponding to the actual question intent is higher than the target value, based on the model input question, the actual question intent and the question association information, the first language model set is used to generate prompt information corresponding to the model input question. The specific implementation method will not be repeated here.
[0095] In some optional implementations of some embodiments, the execution subject may generate prompt information corresponding to the model input question using the first large language model set according to the model input question and the question association information, including the following steps:
[0096] The first step is to select at least one first language model corresponding to the problem domain information and the user role information from the first language model set, wherein each first language model has a corresponding model usage domain set and a dedicated role information set.
[0097] As an example, the execution subject may filter out from the first large language model set at least one first large language model whose model usage domain set corresponds to the problem domain information and whose role information set corresponds to the user role information.
[0098] The second step is to generate prompt generation information for the above model input question, the above question intent, the above question context information, the above question domain information, the above user role information and the above key slot optimization information.
[0099] The third step is to input the prompt generation information into the at least one first language model to generate the prompt information.
[0100] In some optional implementations of some embodiments, after step 203, the steps further include:
[0101] The first step is to determine the corresponding prompt information template according to the above question domain information and the above question intention. The prompt information template can represent the content type and content format corresponding to the prompt information.
[0102] As an example, the execution subject may search the target database for a prompt information template corresponding to the problem domain information and the problem intention.
[0103] The second step is to optimize the content of the prompt information according to the prompt information template to generate the second prompt optimized content.
[0104] As an example, first, the execution subject may determine each template content under each content type in the prompt information template, and then perform content expansion optimization on the prompt information according to each template content to generate the second prompt optimization content.
[0105] As another example, the execution entity may directly add the prompt information to the prompt information template to generate the second prompt optimization content.
[0106] The third step is to determine the second prompt optimization content as prompt information.
[0107] Step 204, using the pre-trained second largest language model set, to generate question answer information corresponding to the prompt information.
[0108] In some embodiments, the execution subject may generate question answer information corresponding to the prompt information using a pre-trained second largest language model set. The question answer information may be the question answer content of the model input question. Each second largest language model in the second largest language model set may be a large language model with different model structures, model expertise, etc. The second largest language model may be a large language model that performs value outflow processing during use. That is, the second largest language model may be a large language model that requires value payment during use. That is, the second largest language model may be a large language model that requires payment for use.
[0109] As an example, first, a second largest language model is randomly selected from the second largest language model set as a candidate large language model. Then, the prompt information is input into the candidate large language model to generate question answer information.
[0110] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the question answering model method of some embodiments of the present disclosure, on the basis of less value outflow, high-quality prompt information is accurately generated through the first large language model set, and the question answering information corresponding to the prompt information is accurately and efficiently generated through the second large language model set. Specifically, the reason for the low efficiency of the relevant question answering and the high cost of model use is that the question input by the user may have semantic ambiguity or the natural language processing ability corresponding to the large language model is poor, which makes it difficult for the large language model to accurately understand the question semantics of the question. Therefore, it is necessary to interact with the large language model for multiple rounds, which not only has low interaction efficiency, but also wastes a lot of model use costs of the large language model. Based on this, the question answering method of some embodiments of the present disclosure first obtains the model input question corresponding to the target user to preliminarily obtain the question that the target user needs to answer. Then, using the pre-trained first large language model set, the question association information corresponding to the above model input question can be accurately generated. Among them, the first large language model is a self-owned large language model that does not perform value outflow processing during use. Here, through the first largest language model set that does not need to perform value outflow processing operations, the problem-related information corresponding to the model input problem can be preliminarily supplemented to avoid the problem of semantic ambiguity in the model input problem. In addition, by using the first largest language model set, the problem-related information can be preliminarily supplemented at a low model usage cost. Then, according to the above-mentioned model input problem and the above-mentioned problem-related information, the above-mentioned first largest language model set can be used to generate high-quality prompt information corresponding to the above-mentioned model input problem. In addition, by using the first largest language model set to generate problem-related information and prompt information, the subsequent second largest language model set can avoid the occurrence of poor natural language processing capabilities, and ensure that the second largest language model set generates accurate reply content based on the prompt information. Finally, using the pre-trained second largest language model set, the question reply information corresponding to the above prompt information can be accurately generated. Among them, the second largest language model is a large language model that performs value outflow processing during use. In summary, by using the first largest language model set that does not require value outflow processing to generate question-related information to supplement the model input question (i.e., generate question-related information) and generate high-quality prompt information, the second largest language model set can be used to accurately identify the question semantics corresponding to the model input question on the basis of less value outflow, so as to accurately generate question answer information.
[0111] Further references Figure 3 , shows a process 300 of another embodiment of the question answering method according to the present disclosure. The question answering method comprises the following steps:
[0112] Step 301, obtaining the model input question corresponding to the target user.
[0113] Step 302, using the pre-trained first large language model set, generates question association information corresponding to the above model input question.
[0114] Step 303: Generate prompt evaluation information corresponding to the prompt information using a pre-trained prompt information evaluation model.
[0115] In some embodiments, an execution entity (e.g. Figure 1 The electronic device 101 shown can use a pre-trained prompt information evaluation model to generate prompt evaluation information corresponding to the above prompt information. Among them, the prompt information evaluation model can be a neural network model that performs quality evaluation on the prompt information. In practice, the prompt information evaluation model can be a large language model pre-trained for prompt information evaluation. The prompt evaluation information can characterize the information accuracy and information content quality of the prompt information. In specific practice, the prompt evaluation information can be information in numerical form or in label form. The larger the numerical value, the higher the information content quality of the corresponding prompt information.
[0116] As an example, first, quality assessment prompt information representing quality assessment of prompt information is generated, and then the quality assessment prompt information is input into a prompt information evaluation model to generate prompt evaluation information.
[0117] Step 304, in response to determining that the prompt evaluation information does not meet the preset evaluation condition, the prompt information is optimized using the prompt information evaluation model to generate first prompt optimization content.
[0118] In some embodiments, in response to determining that the above-mentioned prompt evaluation information does not meet the preset evaluation conditions, the above-mentioned execution entity can use the above-mentioned prompt information evaluation model to optimize the content of the above-mentioned prompt information to generate a first prompt optimization content. Among them, the preset evaluation condition can be a preset prompt evaluation condition. In specific practice, the preset evaluation condition can be that the corresponding prompt evaluation value is higher than the target evaluation value or the corresponding prompt evaluation label is the target label. The target evaluation value can be a preset evaluation experience value. The target label can represent a label whose corresponding evaluation quality is higher than the target level.
[0119] As an example, first, content optimization prompt information representing quality content optimization of prompt information is generated. Then, the content optimization prompt information is input into the prompt information evaluation model to generate first prompt optimization content.
[0120] In some optional implementations of some embodiments, after step 304, the steps further include:
[0121] The first step is to determine the prompt optimization content evaluation information corresponding to the first prompt optimization content. The prompt optimization content evaluation information may be information accuracy and information content quality that characterize the first prompt optimization content. In specific practice, the prompt optimization content evaluation information may be information in numerical form or information in label form. The larger the numerical value, the higher the information content quality of the corresponding first prompt optimization content.
[0122] In the second step, in response to determining that the above-mentioned prompt optimization content evaluation information does not meet the above-mentioned target evaluation conditions, the above-mentioned first large language model set is used to supplement the question content of the above-mentioned model input question through the large language model interaction to obtain the supplemented question content.
[0123] The third step is to generate the third prompt optimization content based on the above supplemented question content.
[0124] As an example, first, optimization content generation prompt information for generating prompt optimization content according to the supplemented question content is generated. Then, the optimization content generation prompt information is input into any first language model in the first language model set to generate third prompt optimization content.
[0125] The fourth step is to determine the third prompt optimization content as the first prompt optimization content.
[0126] Step 305: determine the first prompt optimization content as prompt information.
[0127] In some embodiments, the execution entity may determine the first prompt optimization content as prompt information.
[0128] like Figure 4 As shown, a schematic diagram is shown for clarifying the focus of supplementary questions based on the first large language model set.
[0129] like Figure 4As shown, for the target question raised by the target user, first, the target question is identified for intent to generate the question intent. Then, the target question is matched for domain to determine the domain information involved in the question and obtain the question domain information. Next, the target question is matched for dynamic roles to generate user role information. Secondly, the target question is intelligently processed for slots to generate key slot information. In the process of generating the question intent, question domain information, user role information and key slot information, the generated information can be further optimized by the local large language model to generate more accurate question intent, question domain information, user role information and key slot information. After obtaining the question intent, question domain information, user role information and key slot information, the local large language model can be used to accurately generate prompt information representing the answer to the target question. Furthermore, the prompt information can be evaluated for quality and optimized by the prompt information evaluation model to obtain more accurate optimized reply information. Finally, the optimized reply information is input into the externally called large language model to generate question reply information. Here, by setting up a vector library, regular training of a local large language model can be achieved. In addition, when the vectors in the vector library are relatively rich, the question answer information corresponding to the question can be directly queried from the vector library by semantic retrieval. The question answer information corresponding to the question can also be directly queried from the vector library by asking questions, question intentions, question domain information, user role information and key slot information. Among them, the vector library can be a database that stores various questions, various question answers, prompt information templates, prompt information, main knowledge content and user-related descriptions.
[0130] Step 306, using the pre-trained second largest language model set, to generate question answer information corresponding to the prompt information.
[0131] In some embodiments, the specific implementation of steps 301-302 and 306 and the technical effects thereof can be referred to in Figure 2 The steps 201 - 202 and 204 in the corresponding embodiment are not described in detail here.
[0132] from Figure 3 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 3 In the process 300 of the question answering method in some corresponding embodiments, by using a prompt information evaluation model, the prompt information can be further evaluated and optimized for quality to generate higher quality prompt information, so that the subsequent second largest language model set can accurately identify the question content semantics corresponding to the model input question to achieve accurate answers to the questions.
[0133] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a question answering device. These device embodiments are similar to Figure 2 Corresponding to the method embodiments shown, the question answering device can be specifically applied to various electronic devices.
[0134] like Figure 5 As shown, a question answering device 500 includes: an acquisition unit 501, a first generation unit 502, a second generation unit 503 and a third generation unit 504. The acquisition unit 501 is configured to acquire a model input question corresponding to a target user; the first generation unit 502 is configured to generate question association information corresponding to the model input question using a pre-trained first large language model set, wherein the first large language model is a self-owned large language model that does not perform value outflow processing during use; the second generation unit 503 is configured to generate prompt information corresponding to the model input question using the first large language model set according to the model input question and the question association information; the third generation unit 504 is configured to generate question answer information corresponding to the prompt information using a pre-trained second large language model set, wherein the second large language model is a large language model that performs value outflow processing during use.
[0135] In some optional implementations of some embodiments, the second generation unit 503 can be further configured to: determine the question intent corresponding to the above-mentioned model input question; in response to determining that the intent confidence corresponding to the above-mentioned question intent is higher than the target value, based on the above-mentioned model input question, the above-mentioned question intent and the above-mentioned question association information, using the above-mentioned first large language model set, generate prompt information corresponding to the above-mentioned model input question.
[0136] In some optional implementations of some embodiments, the second generation unit 503 can be further configured to: in response to determining that the above-mentioned intent confidence is lower than or equal to the above-mentioned target value, using the above-mentioned first large language model set, through the large language model interaction method, determine the intent description information of the user's reply corresponding to the above-mentioned question intent; according to the above-mentioned intent description information, perform intent adjustment on the above-mentioned question intent to generate the actual question intent; in response to determining that the intent confidence corresponding to the above-mentioned actual question intent is higher than the above-mentioned target value, based on the above-mentioned model input question, the above-mentioned actual question intent and the above-mentioned question association information, generate prompt information corresponding to the above-mentioned model input question using the above-mentioned first large language model set.
[0137] In some optional implementations of some embodiments, the above-mentioned question-related information includes: question context information; and the first generation unit 502 can be further configured to: utilize the above-mentioned first large language model set to generate the question context information corresponding to the above-mentioned model input question through the large language model interaction.
[0138] In some optional implementations of some embodiments, the above-mentioned question-related information also includes: question domain information and user role information; and the first generation unit 502 can be further configured to: determine the above-mentioned question domain information according to the above-mentioned question intention; generate the above-mentioned user role information through the interaction of the large language model according to the above-mentioned question context information and the above-mentioned model input question.
[0139] In some optional implementations of some embodiments, the above-mentioned question-related information also includes: key slot optimization information; and the first generation unit 502 can be further configured to: determine the key slot information corresponding to the above-mentioned model input question; according to the above-mentioned question context information and the above-mentioned question intent, use the above-mentioned first large language model set to optimize the content of the above-mentioned key slot information to generate key slot optimization information.
[0140] In some optional implementations of some embodiments, the second generation unit 503 can be further configured to: filter out at least one first large language model corresponding to the above-mentioned problem domain information and the above-mentioned user role information from the above-mentioned first large language model set; generate prompt generation information for the above-mentioned model input question, the above-mentioned problem intent, the above-mentioned problem context information, the above-mentioned problem domain information, the above-mentioned user role information and the above-mentioned key slot optimization information; input the above-mentioned prompt generation information into the above-mentioned at least one first large language model to generate the above-mentioned prompt information.
[0141] In some optional implementations of some embodiments, the device 500 further includes: a fourth generation unit, a first content optimization unit, and a first determination unit (not shown in the figure). The fourth generation unit may be configured to: generate prompt evaluation information corresponding to the prompt information using a pre-trained prompt information evaluation model. The first content optimization unit may be configured to: in response to determining that the prompt evaluation information does not meet a preset evaluation condition, optimize the content of the prompt information using the prompt information evaluation model to generate a first prompt optimization content. The first determination unit may be configured to: determine the first prompt optimization content as the prompt information.
[0142] In some optional implementations of some embodiments, the device 500 further includes: a second determination unit, a second content optimization unit, and a third determination unit (not shown in the figure). The second determination unit may be configured to: determine the corresponding prompt information template according to the problem domain information and the problem intent. The second content optimization unit may be configured to: optimize the content of the prompt information according to the prompt information template to generate second prompt optimization content. The third determination unit may be configured to: determine the second prompt optimization content as prompt information.
[0143] In some optional implementations of some embodiments, the acquisition unit 501 may be further configured to: utilize a pre-installed intelligent prompt information optimization plug-in to acquire the model input question corresponding to the target user.
[0144] It is understandable that the units described in the question answering device 500 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the question answering device 500 and the units included therein, and will not be described in detail here.
[0145] Reference below Figure 6 , which shows an electronic device (eg, Figure 1 Schematic diagram of the structure of the electronic device 101)600. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0146] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory 602 or a program loaded from a storage device 608 into a random access memory 603. Various programs and data required for the operation of the electronic device 600 are also stored in the random access memory 603. The processing device 601, the read-only memory 602, and the random access memory 603 are connected to each other via a bus 604. An input / output interface 605 is also connected to the bus 604.
[0147] Typically, the following devices may be connected to the input / output interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0148] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a read-only memory 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0149] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0150] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0151] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains the model input question corresponding to the target user; generates question-related information corresponding to the model input question using the pre-trained first large language model set, wherein the first large language model is a self-owned large language model that does not perform value outflow processing during use; generates prompt information corresponding to the model input question using the first large language model set according to the model input question and the question-related information; generates question answer information corresponding to the prompt information using the pre-trained second large language model set, wherein the second large language model is a large language model that performs value outflow processing during use.
[0152] Computer program code for performing the operation of some embodiments of the present disclosure can be written in one or more programming languages or a combination thereof, the programming languages including object-oriented programming languages, and also including conventional procedural programming languages. The program code can be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0153] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0154] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be set in a processor, for example, may be described as: a processor includes an acquisition unit, a first generation unit, a second generation unit, and a third generation unit. The names of these units do not constitute limitations on the units themselves in some cases, for example, the acquisition unit may also be described as a "unit for acquiring the height and width of the first target image".
[0155] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0156] Some embodiments of the present disclosure further provide a computer program product, including a computer program, which implements any of the above-mentioned question answering methods when executed by a processor.
[0157] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A question answering method, comprising: Get the model input questions corresponding to the target user; Generate question-related information corresponding to the model input question using a pre-trained first large language model set, wherein the first large language model is a self-owned large language model that does not perform value outflow processing during use; Generate prompt information corresponding to the model input question using the first large language model set according to the model input question and the question association information; The question answer information corresponding to the prompt information is generated by using the pre-trained second largest language model set, wherein the second largest language model is a large language model that performs value outflow processing during use.
2. The method according to claim 1, wherein: The step of generating prompt information corresponding to the model input question by using the first large language model set according to the model input question and the question association information includes: Determine the problem intent corresponding to the model input problem; In response to determining that the intent confidence corresponding to the question intent is higher than the target value, prompt information corresponding to the model input question is generated based on the model input question, the question intent and the question association information using the first large language model set.
3. The method according to claim 2, wherein: The method further comprises: In response to determining that the intent confidence is lower than or equal to the target value, using the first large language model set, through large language model interaction, determine intent description information of the user's answer corresponding to the question intent; According to the intention description information, adjusting the question intention to generate an actual question intention; In response to determining that the intent confidence corresponding to the actual question intent is higher than the target value, prompt information corresponding to the model input question is generated based on the model input question, the actual question intent and the question association information using the first large language model set.
4. The method according to claim 2, wherein: The question-related information includes: question context information; and The step of using the pre-trained first large language model set to generate question association information corresponding to the model input question includes: The first large language model set is used to generate question context information corresponding to the model input question through large language model interaction.
5. The method according to claim 4, wherein: The problem-related information also includes: problem domain information and user role information; and The step of using the pre-trained first large language model set to generate question association information corresponding to the model input question includes: According to the problem intention, determine the problem domain information; The user role information is generated according to the question context information and the model input question through interaction with a large language model.
6. The method according to claim 5, wherein: The problem-related information also includes: key slot optimization information; and The step of using the pre-trained first large language model set to generate question association information corresponding to the model input question includes: Determine key slot information corresponding to the model input problem; According to the question context information and the question intent, the key slot information is content optimized using the first large language model set to generate key slot optimization information.
7. The method according to claim 6, wherein: The step of generating prompt information corresponding to the model input question by using the first large language model set according to the model input question and the question association information includes: Filtering at least one first large language model corresponding to the problem domain information and the user role information from the first large language model set; Generate prompt generation information for the model input question, the question intent, the question context information, the question domain information, the user role information and the key slot optimization information; The prompt generation information is input into the at least one first large language model to generate the prompt information.
8. The method according to claim 6, wherein: After generating prompt information corresponding to the model input question using the first large language model set according to the model input question and the question association information, the method further includes: Using a pre-trained prompt information evaluation model, generating prompt evaluation information corresponding to the prompt information; In response to determining that the prompt evaluation information does not meet a preset evaluation condition, optimizing the prompt information using the prompt information evaluation model to generate first prompt optimization content; The first prompt optimization content is determined as prompt information.
9. The method according to claim 5, wherein: After generating prompt information corresponding to the model input question using the first large language model set according to the model input question and the question association information, the method further includes: Determine a corresponding prompt information template according to the problem domain information and the problem intention; Optimizing the prompt information content according to the prompt information template to generate second prompt optimized content; The second prompt optimization content is determined as prompt information.
10. The method according to claim 8, wherein: After optimizing the prompt information using the prompt information evaluation model in response to determining that the prompt evaluation information does not meet the preset evaluation condition to generate first prompt optimization content, the method further includes: Determine prompt optimization content evaluation information corresponding to the first prompt optimization content; In response to determining that the prompt optimization content evaluation information does not meet the target evaluation condition, using the first large language model set, in a large language model interaction manner, supplementing the model input question with question content to obtain supplemented question content; Generating third prompt optimization content according to the supplemented question content; The third prompt optimization content is determined as the first prompt optimization content.
11. The method according to claim 1, wherein: The step of obtaining the model input question corresponding to the target user includes: Use the pre-installed smart prompt information optimization plug-in to obtain the model input questions corresponding to the target users.
12. A question answering device, comprising: an acquisition unit, configured to acquire a model input question corresponding to a target user; A first generating unit is configured to generate question-related information corresponding to the model input question using a pre-trained first large language model set, wherein the first large language model is a self-owned large language model that does not perform value outflow processing during use; A second generating unit is configured to generate prompt information corresponding to the model input question by using the first large language model set according to the model input question and the question association information; The third generating unit is configured to generate question answer information corresponding to the prompt information by using a pre-trained second largest language model set, wherein the second largest language model is a large language model that performs value outflow processing during use.
13. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 11.
14. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
15. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 11.