Knowledge question and answer method and device, electronic equipment and storage medium
By judging the difficulty type of the problem and selecting the appropriate solution method, complex problems are decomposed and integrated, and the problem of inaccurate answers is solved in large language models that generate inaccurate answers under complex problems, achieving more accurate answer generation.
Patent Information
- Application Number
- CN202510540673.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-07-22
AI Technical Summary
Existing large language models are difficult to correctly understand when facing complex problems, resulting in the generation of inaccurate or irrelevant answers.
By determining the difficulty type of the problem and selecting multi-dimensional enumeration solution, incremental correlation inference solution or mixed solution methods under complex problems, the problem is decomposed and integrated, and the target domain question-and-answer model is used to generate answers.
Improve the accuracy of answer generation of complex questions, ensuring that the answers are more relevant and accurate to the questions.
Smart Images

Figure CN120353897A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to a knowledge question and answer method, apparatus, electronic device, and storage medium. Background Art
[0002] With the rapid development of artificial intelligence technology, especially the breakthroughs in large language models, the research and development of intelligent question and answer systems have entered a new stage of development. The emergence of large language models such as GPT and BERT has provided powerful language understanding and generation capabilities for intelligent question and answer systems, greatly promoting the application of question and answer systems in various fields.
[0003] Although large language models can implement question and answer, they generate answers in the same way for different questions. Especially when facing complex questions, if the questions are directly input into the large language model to generate answers, it may be impossible for the model to correctly understand due to the complexity of the questions, resulting in inaccurate or irrelevant answers. Summary of the Invention
[0004] This application provides a knowledge question and answer method, apparatus, electronic device, and storage medium to solve the problem in the prior art that due to the complexity of questions, the model cannot correctly understand and inaccurate or irrelevant answers are generated.
[0005] According to the first aspect of the embodiments of this application, a knowledge question and answer method is provided, including:
[0006] Obtain a target question to be answered;
[0007] Determine the difficulty type of the target question, where the difficulty type includes simple questions and complex questions;
[0008] In the case where the target question is a complex question, determine the target solution method for the target question from multiple preset solution methods, where the preset solution methods include multi-dimensional enumeration solution method, progressive correlation reasoning solution method, and hybrid solution method;
[0009] Answer the target question according to the target solution method to obtain the answer information of the target question.
[0010] Optionally, in the case where the target solution method includes the multi-dimensional enumeration solution method, the step of answering the target question according to the target solution method to obtain the answer information of the target question includes:
[0011] Decompose the target question to obtain multiple first sub-questions;
[0012] Perform the following response process for each of the first sub-questions: Determine the first knowledge fragment related to the first sub-question; Input the first sub-question and the first knowledge fragment into the target domain Q&A model for answering to obtain the first sub-answer information of the first sub-question, where the target domain is the domain to which the target question belongs;
[0013] Integrate the target question, the first sub-question, and the first sub-answer information to obtain integrated data;
[0014] Input the integrated data into the target domain Q&A model for answering to obtain the answer information.
[0015] Optionally, decomposing the target question to obtain multiple first sub-questions includes:
[0016] Obtain prompt decomposition hint information, where the prompt decomposition hint information is used to indicate the decomposition method;
[0017] Decompose the target question according to the decomposition method indicated by the prompt decomposition hint information through the target domain Q&A model to obtain the multiple first sub-questions.
[0018] Optionally, determining the first knowledge fragment related to the first sub-question includes:
[0019] Retrieve candidate knowledge fragments related to the first sub-question from a pre-constructed target domain knowledge base;
[0020] Determine the first pre-set number of candidate knowledge fragments with the strongest relevance to the first sub-question as the first knowledge fragment.
[0021] Optionally, when the target solving method includes an incremental associative reasoning solving method, answering the target question according to the target solving method to obtain the answer information of the target question includes:
[0022] Obtain prompt output hint information, where the prompt output hint information is used to indicate the data format of the data output by the target domain answering model;
[0023] Input the target question and the prompt output hint information into the target domain answering model for answering to obtain a first answering result;
[0024] In the case where the data format of the first answering result indicates that it needs to be solved again, perform the following iterative process:
[0025] Obtain the second sub-question in the first answer result, and determine the second knowledge fragment corresponding to the second sub-question; input the second sub-question and the second knowledge fragment into the target domain answer model for answering to obtain second sub-answer information; input the first answer result and the second sub-answer information into the target domain answer model for answering to obtain a second answer result;
[0026] In the case where the data format of the second answer result indicates that it needs to be solved again, update the first answer result to the second answer result and execute the iterative process again;
[0027] In the case where the data format of the second answer result indicates that it does not need to be solved again, determine the second answer result as the answer information.
[0028] Optionally, in the case where the target solution method includes a hybrid solution method, answering the target question according to the target solution method to obtain the answer information of the target question includes:
[0029] Decompose the target question to obtain multiple third sub-questions and the Q&A order of the third sub-questions;
[0030] Determine the difficulty type of each third sub-question in sequence according to the Q&A order;
[0031] In the case where the third sub-question is a complex question, determine the specified solution method for the third sub-question from multiple preset solution methods, and answer the third sub-question according to the specified solution method to obtain the third sub-answer information of the third sub-question;
[0032] In the case where the third sub-question is a simple question, answer the third sub-question through the target domain answer model to obtain the third sub-answer information;
[0033] Input the target question, the Q&A order and all the third sub-answer information into the target domain answer model for answering to obtain the answer information.
[0034] Optionally, determining the difficulty type of the target question includes:
[0035] Input the target question into the first classification model, and classify the target question through the first classification model to obtain the difficulty type;
[0036] The first classification model is obtained through difficulty classification training based on sample questions and the difficulty type annotations corresponding to the sample questions.
[0037] Optionally, determining the target solution method for the target problem from multiple preset solution methods includes:
[0038] Obtain a prompt answer hint message, where the prompt answer hint message is used to indicate the solution idea for the target problem;
[0039] Analyze the target problem through the target domain question - answering model according to the solution idea indicated by the prompt answer hint message to obtain the solution strategy for the target problem;
[0040] Input the target problem and the solution strategy into the second classification model, and classify the target problem through the second classification model to obtain the target solution method.
[0041] According to the second aspect of the embodiments of the present application, a knowledge - based question - answering device is provided, including:
[0042] An acquisition unit, configured to acquire a target problem to be answered;
[0043] A first determination unit, configured to determine the difficulty type of the target problem, where the difficulty type includes simple problems and complex problems;
[0044] A second determination unit, configured to, when the target problem is a complex problem, determine the target solution method for the target problem from multiple preset solution methods, where the preset solution methods include a multi - dimensional enumeration solution method, a progressive correlation reasoning solution method, and a hybrid solution method;
[0045] An answering unit, configured to answer the target problem according to the target solution method to obtain the answer information for the target problem.
[0046] According to the third aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor;
[0047] The memory is connected to the processor and is used to store programs;
[0048] The processor is configured to implement the knowledge - based question - answering method as described in the first aspect by running the programs in the memory.
[0049] According to the fourth aspect of the embodiments of the present application, a storage medium is provided, on which a computer program is stored, and when the computer program is run by a processor, the knowledge - based question - answering method as described in the first aspect is implemented.
[0050] According to a fifth aspect of the embodiments of the present application, there is provided a computer program product, including computer program instructions, which when run by a processor cause the processor to execute the knowledge answering method as described in the first aspect.
[0051] The above technical solution provided by the embodiments of the present application has the following advantages compared with the prior art: In the method provided by the embodiments of the present application, a target question to be answered is obtained; the difficulty type of the target question is determined, and the difficulty type includes simple questions and complex questions; in the case where the target question is a complex question, a target solving method for the target question is determined from multiple preset solving methods; the target question is answered according to the target solving method to obtain the answer information of the target question. In this way, in the case where the target question is a complex question, it is possible to use the target solving method applicable to the target question to answer it, so that the generated answer can be more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0053] Figure 1 It is a flowchart of a knowledge answering method provided by an embodiment of the present application;
[0054] Figure 2 It is a flowchart of a knowledge answering method provided by another embodiment of the present application;
[0055] Figure 3 It is a structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0057] Exemplary implementation environment
[0058] The knowledge Q&A method according to the embodiments of the present application can be executed by an electronic device such as a terminal device or a server. The terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The server can be an independent physical server, a server cluster composed of multiple physical servers, or a cloud server capable of performing cloud computing. This method can be implemented by a processor invoking computer-readable program instructions stored in a memory. In this application, the knowledge Q&A method executed by the server is taken as an example for explanation, but it is not limited thereto.
[0059] Exemplary method
[0060] Please refer to Figure 1 , in an exemplary embodiment, a knowledge Q&A method is provided, including:
[0061] Step 101, obtain a target question to be answered.
[0062] In some embodiments, the target question can be text information input by the user, obtained after converting the voice information input by the user into text information, or obtained after recognizing and extracting text from an image including text.
[0063] Step 102, determine the difficulty type of the target question, where the difficulty type includes simple questions and complex questions.
[0064] In some embodiments, by determining the difficulty type of the target question, different processing strategies can be adopted according to its different difficulty types to improve the accuracy of answering the target question.
[0065] Among them, for the difficulty type of the target question, it can be achieved by classifying the target question through a classification model.
[0066] Specifically, the target question can be input into the first classification model, and the first classification model classifies the target question to obtain the difficulty type; the first classification model is obtained through difficulty classification training based on sample questions and the difficulty type annotations corresponding to the sample questions.
[0067] By setting the first classification model, the automation and efficiency of target question classification can be achieved: reducing labor costs, increasing the processing scale, avoiding subjective biases, and ensuring reliable results.
[0068] Furthermore, dimensions such as the information dimension of the problem, the complexity of the solution process, and the professionalism of the required knowledge can all affect the difficulty of the problem. Therefore, the difficulty type of the target problem can also be analyzed from the above three dimensions.
[0069] Among them, the information dimension can be determined by analyzing the information types and relevance involved in the problem. For example, judge whether the problem depends on a single data source (such as common sense, formulas) or multi-source data (such as interdisciplinary theories, real-time data), check whether there are ambiguous expressions, implicit conditions or ambiguous content, and analyze whether there is a logical relationship (such as causal relationship, parallel relationship) between the information or whether it needs to be integrated to solve the problem.
[0070] The complexity of the solution process is determined by disassembling the steps and evaluating the logical difficulty. For example, disassemble the problem into the smallest execution units, count the number of steps, analyze whether the steps are linear (executed in sequence) or non-linear (requiring loops, branch judgments, iterative verification), and whether there are links that require multiple assumptions, verifications or multi-scheme comparisons.
[0071] The professionalism of the required knowledge is determined by evaluating the depth and breadth of the knowledge required to solve the problem. For example, judge whether the knowledge field belongs to common sense, basic disciplines or professional fields (such as artificial intelligence, legal provisions), evaluate the depth of knowledge to determine whether it requires memorized knowledge or understanding knowledge (such as theoretical models, professional algorithms), and judge whether the problem requires integrating knowledge from multiple fields.
[0072] Step 103, in the case that the target problem is a complex problem, determine the target solution method of the target problem from multiple preset solution methods, and the preset solution methods include multi-dimensional enumeration solution, progressive correlation reasoning solution and hybrid solution.
[0073] In some embodiments, in the case that the target problem is a complex problem, by setting multiple preset solution methods, select the target solution method applicable to answering the target problem to avoid the limitations caused by a single solution method.
[0074] In an alternative embodiment, the determining the target solution method of the target problem from multiple preset solution methods includes:
[0075] Obtain prompt answer hint information, where the prompt answer hint information is used to indicate the solution idea of the target problem;
[0076] Analyze the target problem through the target domain question-answering model according to the solution idea indicated by the prompt answer hint information to obtain the solution strategy of the target problem;
[0077] Input the target problem and the solution strategy into the second classification model, and classify the target problem through the second classification model to obtain the target solution method.
[0078] In some embodiments, Prompt is a technology based on artificial intelligence instructions, which guides the output of the language model through clear and specific instructions. The obtained prompt solution hint information can guide the target domain Q&A model to analyze the core content of the input target problem, conceive the best solution plan, and obtain the solution strategy of the target problem. Among them, the solution strategy can be in the form of a long thinking chain text.
[0079] Exemplarily, the prompt solution hint information can be input into the target domain Q&A model in the following form: "Please systematically analyze the core content of this problem and conceive the best solution plan. The problem is as follows: {query}". Where query refers to the specific content of the target problem.
[0080] After obtaining the solution strategy of the target problem, it can be vectorized and input into the second classification model for automatic discrimination of the problem solution method, so as to obtain the target solution method corresponding to the target problem.
[0081] Among them, there are various ways to vectorize the solution strategy. For example, static word vectors can be generated through advanced word vector models (Word2Vec / GloVe), and dynamic vectorization methods such as dynamic word vector algorithms (ELMo) and BERT can be selected.
[0082] Among them, the target domain refers to the domain to which the target problem belongs. For example, the scientific domain (such as chemistry, materials, and chemical engineering, etc.), the mechanical domain, the artificial intelligence domain, the physical domain, the electrical domain, etc.
[0083] The target domain Q&A model can be obtained by training the knowledge of the large language model with the professional knowledge of the target domain.
[0084] Step 104: Answer the target problem according to the target solution method to obtain the answer information of the target problem.
[0085] In some embodiments, a corresponding answer processing process is configured for each preset solution method. After determining the target solution method, the target problem is answered according to the answer processing process corresponding to the target solution method to obtain more accurate answer information.
[0086] In an alternative embodiment, when the target solution method includes a multi-dimensional enumeration solution method, the step of answering the target problem according to the target solution method to obtain the answer information of the target problem includes:
[0087] Decompose the target problem to obtain multiple first sub-problems;
[0088] For each of the first sub-problems, perform the following response process: Determine the first knowledge fragment related to the first sub-problem; Input the first sub-problem and the first knowledge fragment into the target domain question-answering model for answering to obtain the first sub-answer information of the first sub-problem, where the target domain is the domain to which the target problem belongs;
[0089] Integrate the target problem, the first sub-problem, and the first sub-answer information to obtain integrated data;
[0090] Input the integrated data into the target domain question-answering model for answering to obtain the answer information.
[0091] In some embodiments, when the target solution method includes a multi-dimensional enumeration solution method, a total score thinking plus answer mode can be adopted, that is, perform a unified planning for solving the original problem and aggregate multiple dimensions to generate an answer.
[0092] By decomposing the target problem into multiple first sub-problems and answering each first sub-problem separately, the complexity of the target problem can be reduced and the solvability of the target problem can be improved. After obtaining the first sub-answer information of each first sub-problem, by integrating all the first sub-problems, all the first sub-answer information, and the target problem and inputting them into the target domain question-answering model, the target domain question-answering model not only considers the target problem and each first sub-problem, but also refers to each first sub-answer information for answering, making the obtained answer information more accurate.
[0093] Among them, the method of integrating the target problem, the first sub-problem, and the first sub-answer information to obtain integrated data can be achieved through prompt engineering. Obtain the prompt integration prompt information, input it into the target domain question-answering model, and the target domain question-answering model integrates the target problem, the first sub-problem, and the first sub-answer information according to the integration method indicated by the prompt integration prompt information to obtain integrated data.
[0094] Exemplarily, taking the target domain as the chemical materials domain as an example, the prompt integration prompt information can be in the following form:
[0095] "You are an expert in the field of chemical materials and are responsible for integrating the answers. Please select the directly relevant parts based on the original question and the answers to the related sub-questions and organize them into a specific and detailed answer.
[0096] Original question: {query}
[0097] Related sub-questions and answer information: {sub_query_answer}
[0098] !!! Please note:
[0099] - Only use the sub-questions and answer information related to the original question;
[0100] - To ensure text layout, output the answer in markdown format (e.g., bold, line breaks, bullet point lists, etc.) to ensure a clear structure. Answer: "
[0101] In an alternative embodiment, decomposing the target question to obtain a plurality of first sub-questions includes:
[0102] Obtain prompt decomposition hint information, which is used to indicate the decomposition method;
[0103] Decompose the target question according to the decomposition method indicated by the prompt decomposition hint information through the target domain question-answering model to obtain the plurality of first sub-questions.
[0104] In some embodiments, the target question and the above solution strategy can be input into the target domain question-answering model, and the target domain question-answering model decomposes the target question and the solution strategy according to the decomposition method prompted by the prompt decomposition hint information to obtain a plurality of first sub-questions.
[0105] Exemplarily, the prompt decomposition hint information can be in the following manner:
[0106] "To answer the user's question: **{query}**, please extract the sub-questions to be queried according to the following thinking content and return them in the form of a Python string list. If the question is simple and does not need to be decomposed, only keep the original question.
[0107] <Original question>{query}< / Original question><Thought process>{thought}< / Thought process>
[0108] Note: 1) The sub-questions should be consistent with the background and subject of the original question;
[0109] 2) The sub-questions should focus on the points of doubt;
[0110] 3) Do not ask about the basic concepts of terms; please return the list of sub-questions".
[0111] In an alternative embodiment, determining the first knowledge fragments related to the first sub-questions includes:
[0112] Retrieve candidate knowledge fragments related to the first sub-questions from a pre-constructed target domain knowledge base;
[0113] Determine the top preset number of candidate knowledge fragments that are most relevant to the first sub-question as the first knowledge fragment.
[0114] In some embodiments, in order to make the first sub-answer information of each first sub-question more accurate, the first knowledge fragment related to each first sub-question can be determined first. By retrieving in a pre-constructed knowledge base of the target domain, relevant knowledge (RAG) fragments are obtained, and the preset number of knowledge fragments with the strongest relevance is selected as the first knowledge fragment. Among them, the preset number can be, but is not limited to, 5.
[0115] In an alternative embodiment, when the target solving method includes an incremental associative reasoning solving method, answering the target question according to the target solving method to obtain the answer information of the target question includes:
[0116] Obtain the prompt output hint information, which is used to indicate the data format of the data output by the target domain answering model;
[0117] Input the target question and the prompt output hint information into the target domain answering model for answering to obtain a first answering result;
[0118] When the data format of the first answering result indicates that it needs to be solved again, perform the following iterative process:
[0119] Obtain the second sub-question in the first answering result, and determine the second knowledge fragment corresponding to the second sub-question; input the second sub-question and the second knowledge fragment into the target domain answering model for answering to obtain the second sub-answer information; input the first answering result and the second sub-answer information into the target domain answering model for answering to obtain a second answering result;
[0120] When the data format of the second answering result indicates that it needs to be solved again, update the first answering result to the second answering result and perform the iterative process again;
[0121] When the data format of the second answering result indicates that it does not need to be solved again, determine the second answering result as the answer information.
[0122] In some embodiments, when the target solving method includes an incremental associative reasoning solving method, it can be a multi-round reasoning and thinking mechanism, and the answer obtained through multi-round derivation is used as the final answer information.
[0123] The prompt outputs a prompt message to instruct the target domain Q&A model to generate the inference result for each round according to the data format it indicates. The output of each round is used as the input for the next round. Among them, the data format is divided into two types, including the format that needs to be solved again and the format that does not need to be solved again. In the case where the data format needs to be solved again, the output of this round is used as the input for the next round to perform inference and thinking again. In the case where the data format does not need to be solved again, the output of this round is used as the final answer information.
[0124] Exemplarily, the prompt output prompt message can include two data formats: "Think + Sub-question + Search Text" and "Think + End". Among them, "Think" is used to instruct the target domain Q&A model to think according to the input information, "Sub-question" is used to instruct the target domain Q&A model to generate sub-questions according to the input information and the thinking content, "Search Text" is used to indicate which additional context or information is needed to provide an accurate answer, and "End" is used to generate the answer.
[0125] Exemplarily, the prompt output prompt message can be as follows:
[0126] "You are a useful Q&A assistant.
[0127] Break down the original question into sub-questions and solve them step by step.
[0128] You can use 'Final Answer' to output the sentences in the answer,
[0129] Use 'Search' to declare which additional context or information is needed to provide an accurate answer.
[0130] Use 'Text Retrieval' to obtain relevant documents through a specific query and summarize their content,
[0131] Please strictly use the following format:
[0132] <Think>
[0133] Analyze the question and the answers to the sub-questions, and then think about the next sub-question.
[0134] <Sub-question>
[0135] The sub-question needs to be solved within one step and does not require reference.
[0136] <Search>
[0137] Text Retrieval: xxx.
[0138] ... (This Think / Sub-question / Search can be repeated zero or more times)
[0139] <Think>
[0140] Integrate the retrieved information and infer the final answer
[0141] <END>
[0142] Final Answer: Final answer to the original input question
[0143] Additional Notes: 1. Do not use your own knowledge to analyze or answer questions
[0144] 2. After you make each <search> action, wait for me to provide the answer to the sub-question and then think carefully about the next idea.
[0145] 3. The answers to the questions are available on the Internet and are not private"
[0146] After obtaining the prompt output information and the target question, the target domain question answering model first thinks and obtains the first answer result. The first answer result can be obtained by retrieving knowledge fragments related to the target sub-questions generated based on the target question from the target domain knowledge base, and then answering the target domain question answering model through the knowledge fragments and the target sub-questions.
[0147] By judging the data format of the first answer result, it is determined whether it needs to be solved again. If it indicates that it needs to be solved again, it means that there is a sub-question in the first answer result. The second sub-question in the first answer result of this round of reasoning can be extracted through the sub-question identifier, and then the second answer result of the second sub-question is obtained by recalling the RAG fragments of the second sub-question and splicing them into the target domain question-answering model.
[0148] Among them, there are two modes for the second answer result. If the answer is in the data format of "thinking + sub-question + search", it is believed that the model believes that the current information is not sufficient to answer this round of queries and the solution of the original question, and then continue to extract and obtain sub-questions, determine knowledge fragments, and answer through the model until the model obtains the final answer; if the answer is "thinking + end", it is believed that the model believes that the current information is able to answer this round of queries and the solution of the target question, thereby obtaining the answer information.
[0149] For example, taking the target question "How to prepare a mesoporous ternary metal catalyst and use it for hydrogen evolution reaction" as an example, after inputting it into the target domain question answering model, the target domain question answering model performs the following reasoning process:
[0150] "query":"How to prepare a mesoporous ternary metal catalyst and use it for hydrogen evolution reaction"
[0151] <thought_and_response>
[0152] "thought":"
[0153] <Thought>
[0154] To prepare a mesoporous intermetallic catalyst for hydrogen evolution reaction, it is first necessary to consider the theoretical feasibility of the actual operation of this problem. As the second-generation mesoporous material, porous metals with continuous crystal frameworks have special research value in catalysis and electrocatalysis. Porous metals combine the advantages of "large nanoparticles" (e.g., fast electron transfer and high stability) and "small nanoparticles" (e.g., large surface area and more catalytic active sites), thus improving the (electro)catalytic performance. Therefore, the user's request is theoretically feasible. Next, several key steps need to be specifically considered: selecting suitable intermetallic compounds, synthesizing mesoporous structures, ensuring a high specific surface area of the catalyst, and conducting electrochemical performance tests. First, it is necessary to determine which intermetallic compound has excellent catalytic performance for hydrogen evolution reaction (HER). Next, it is necessary to consider how to synthesize this mesoporous catalyst, including selecting suitable precursors, templating agents, reducing agents, and synthesis conditions. Finally, it is necessary to conduct functional characterization of the synthesized catalyst, including structural and chemical composition analysis, and HER performance testing.
[0155] <Sub-question 1>
[0156] Which metal elements should be selected to form a mesoporous ternary intermetallic compound with excellent catalytic performance for hydrogen evolution reaction (HER)?
[0157] <Search>
[0158] Text retrieval:
[0159] Mesoporous intermetallic catalyst
[0160] Mesoporous ternary metal
[0161] Hydrogen evolution reaction
[0162] "
[0163] "response":"
[0164] The following key points can help select a ternary metal element combination to obtain an ordered mesoporous intermetallic compound with excellent activity for electrochemical hydrogen evolution reaction (HER):
[0165] 1. With highly active noble metals platinum (Pt) and palladium (Pd) as the core
[0166] Currently, the elemental composition of ordered mesoporous intermetallic nanoparticles is limited to nanomaterials based on platinum (Pt) and palladium (Pd). Noble metals act as active centers in alloys / intermetallic compounds, helping to accelerate the adsorption and desorption of hydrogen on the electrode surface.
[0167] 2. Introduction of transition metals that can adjust the electronic structure
[0168] When common 3d transition metals (such as Fe, Co, Ni, Zn, etc.) form intermetallic phases with noble metals, they will change the d-band center of the noble metals, thereby optimizing the adsorption energy of hydrogen atoms on the surface.
[0169] By selecting a suitable combination of transition metals, hydrogen adsorption can be regulated between "too strong or too weak", enabling the hydrogen evolution reaction to proceed at a relatively low overpotential.
[0170] 3. The mutual synergy of the third metal
[0171] When the second metal already has a certain electronic regulation effect, the third metal can synergistically improve durability, accelerate charge transfer, or further fine-tune the surface electronic state.
[0172] For example, in PtZnCo, Zn improves the moderately strong adsorption of hydrogen, while Co helps to enhance the stability and conductivity of the alloy. ;
[0174] "thought":"
[0175] <Thought>
[0176] xxx
[0177] <Sub-question 2>
[0178] xxx
[0179] <Search>
[0180] xxx
[0181] "
[0182] "response":"
[0183] xxx
[0184] "
[0185] < / thought_and_response>
[0186] "answer":"
[0187] <Thought>
[0188] <End>
[0189] Final answer: xxx
[0190] "
[0191] Among them, "xxx" in the above example is used to refer to the relevant information generated by the Q&A model in the target field, which is omitted here.
[0192] In an optional embodiment, when the target solution method includes a hybrid solution method, answering the target problem according to the target solution method to obtain the answer information of the target problem includes:
[0193] Decompose the target problem to obtain a plurality of third sub-problems and the Q&A order of the third sub-problems;
[0194] Determine the difficulty type of each of the third sub-problems in sequence according to the Q&A order;
[0195] When the third sub-problem is a complex problem, determine the specified solution method for the third sub-problem from a plurality of the preset solution methods, and answer the third sub-problem according to the specified solution method to obtain the third sub-answer information of the third sub-problem;
[0196] When the third sub-problem is a simple problem, answer the third sub-problem through the target domain answer model to obtain the third sub-answer information;
[0197] Input the target problem, the Q&A order, and all the third sub-answer information into the target domain answer model for answering to obtain the answer information.
[0198] In some embodiments, when the target solution method includes a hybrid solution method, it can be a solution mode that combines the multi-dimensional enumeration solution method and the progressive correlation reasoning solution method. It can sort the relevant nested information according to the order of the list of sub-problems (such as the original problem, <sub-problem 1: answer (obtained by using the simple problem solution method, multi-dimensional enumeration solution method or progressive correlation reasoning solution method)>, <sub-problem 2: sub-problem answer>,....), and finally rely on the target domain Q&A model for integrated output.
[0199] Among them, for the method of decomposing the target problem into a plurality of third sub-problems, reference can be made to the method of generating a plurality of first sub-problems provided in the above embodiments, which will not be elaborated here.
[0200] The specified solution method for the third sub-problem can be implemented by referring to the specific implementation processes of the above multi-dimensional enumeration solution method or progressive correlation reasoning solution method, which will not be elaborated here.
[0201] It can be understood that considering the actual resource consumption and the time dimension requirements of the user's answer, interruption mechanisms such as the number of iterations, the number of sub-problem decomposition rounds, and the duration of generating the answer information can be limited in the iterative loop to ensure the stable operation of the system.
[0202] Further, in the case where the target question is a simple question, the target question can be input into the above-mentioned target domain Q&A model, and the intelligent agent can be directly called through the target domain Q&A model or the target question can be answered based on its own knowledge to obtain answer information.
[0203] For the knowledge Q&A method of this application, see Figure 2 , for the question input by the user, the large model is used to identify the intention and classify whether it is a complex scientific question. If it is not, the answer is directly output to the candidate information pool based on the domain chemistry large model; if it is judged to be a complex question, the long thinking chain thinking process text is obtained through fine-tuning training of the large model distillation, and it is input into the multi-level classifier to judge which one of the hybrid solution mode, multi-dimensional enumeration solution, and progressive association reasoning solution mode it is. Then, the complex problem is disassembled and deduced for the three different reasoning modes respectively.
[0204] Specifically, for the multi-dimensional enumeration solution mode, the prompt is designed based on the original question and the thinking text, and the relevant analysis dimensions are extracted and rewritten into a list of relevant sub-questions. Then, the RAG fragments related to each sub-question are recalled in parallel, and the answers to these sub-questions with recalled information are processed in parallel. Then, these information are merged to obtain the model answer and enter the candidate information pool; for the progressive association solution step, a multi-round thinking mechanism is introduced to decompose and answer the question, and the next-step question planning and solution are carried out by using the integration ability of the model's multi-round historical information until it is judged that the current query question is solved, and the answer enters the candidate information pool; for the hybrid solution mode, the answer generation mode is organized by referring to the extracted list of sub-questions and their order, and then each sub-question is disassembled into three types: simple question, progressive, and enumeration type in order, and the process is iterated continuously so that the answer information of the disassembled sub-modules is converged into the candidate information pool. Finally, according to the original question type and the nested sub-question type, the answer template is set and these information sources are finally integrated to output the solution steps of this question and the final answer.
[0205] This method can design and construct an inference scheme and method with a multi-stage and multi-round reflection mechanism based on the question type, long thinking chain text, historical multi-round information, and external knowledge information, which can be applied to aspects such as the design and demonstration of professional experimental schemes in the field of scientific research, so that this method has characteristics such as accuracy, comprehensiveness, and traceable interpretability in the planning and solution of domain problems, effectively assisting the efficiency of professional knowledge Q&A and mining in scientific research.
[0206] Exemplary device
[0207] Correspondingly, the embodiment of this application also provides a knowledge Q&A device, including:
[0208] An acquisition unit for acquiring a target question to be answered;
[0209] A first determination unit for determining the difficulty type of the target question, where the difficulty type includes simple questions and complex questions;
[0210] A second determination unit for, when the target question is a complex question, determining a target solution method for the target question from multiple preset solution methods, where the preset solution methods include a multi-dimensional enumeration solution method, a progressive correlation reasoning solution method, and a hybrid solution method;
[0211] An answering unit for answering the target question according to the target solution method to obtain answer information for the target question.
[0212] Based on any of the above embodiments, when the target solution method includes a multi-dimensional enumeration solution method, the answering unit is further configured to:
[0213] Decompose the target question to obtain a plurality of first sub-questions;
[0214] Perform the following answering process for each of the first sub-questions: determine a first knowledge fragment related to the first sub-question; input the first sub-question and the first knowledge fragment into a target domain question-answering model for answering to obtain first sub-answer information for the first sub-question, where the target domain is the domain to which the target question belongs;
[0215] Integrate the target question, the first sub-questions, and the first sub-answer information to obtain integrated data;
[0216] Input the integrated data into the target domain question-answering model for answering to obtain the answer information.
[0217] Based on any of the above embodiments, decomposing the target question to obtain a plurality of first sub-questions includes:
[0218] Obtain prompt decomposition hint information, where the prompt decomposition hint information is used to indicate a decomposition method;
[0219] Decompose the target question according to the decomposition method indicated by the prompt decomposition hint information through the target domain question-answering model to obtain the plurality of first sub-questions.
[0220] Based on any of the above embodiments, determining a first knowledge fragment related to the first sub-question includes:
[0221] Retrieve candidate knowledge fragments related to the first sub-question from a pre-constructed target domain knowledge base;
[0222] Determine the top pre-set number of candidate knowledge fragments that are most relevant to the first sub-question as the first knowledge fragment.
[0223] Based on any of the above embodiments, when the target solving method includes an incremental correlation reasoning solving method, the answering unit is further configured to:
[0224] Obtain a prompt output hint message, where the prompt output hint message is used to indicate the data format of the data output by the target domain answering model;
[0225] Input the target question and the prompt output hint message into the target domain answering model for answering to obtain a first answering result;
[0226] In the case where the data format of the first answering result indicates that it needs to be solved again, perform the following iterative process:
[0227] Obtain the second sub-question in the first answering result, and determine the second knowledge fragment corresponding to the second sub-question; input the second sub-question and the second knowledge fragment into the target domain answering model for answering to obtain second sub-answer information; input the first answering result and the second sub-answer information into the target domain answering model for answering to obtain a second answering result;
[0228] In the case where the data format of the second answering result indicates that it needs to be solved again, update the first answering result to the second answering result and perform the iterative process again;
[0229] In the case where the data format of the second answering result indicates that it does not need to be solved again, determine the second answering result as the answer information.
[0230] Based on any of the above embodiments, when the target solving method includes a hybrid solving method, the answering unit is further configured to:
[0231] Decompose the target question to obtain a plurality of third sub-questions and the answering order of the third sub-questions;
[0232] Determine the difficulty type of each third sub-question in sequence according to the answering order;
[0233] In the case where the third sub-question is a complex question, determine the specified solving method of the third sub-question from a plurality of the preset solving methods, and answer the third sub-question according to the specified solving method to obtain third sub-answer information of the third sub-question;
[0234] When the third sub-question is a simple question, answer the third sub-question through the target domain answer model to obtain the third sub-answer information;
[0235] Input the target question, the Q&A sequence, and all the third sub-answer information into the target domain answer model for answering to obtain the answer information.
[0236] Based on any of the above embodiments, the first determination unit is further configured to:
[0237] Input the target question into the first classification model, classify the target question through the first classification model to obtain the difficulty type;
[0238] The first classification model is obtained through difficulty classification training based on sample questions and the difficulty type annotations corresponding to the sample questions.
[0239] Based on any of the above embodiments, the second determination unit is further configured to:
[0240] Obtain prompt solution hint information, where the prompt solution hint information is used to indicate the solution idea of the target question;
[0241] Analyze the target question through the target domain Q&A model according to the solution idea indicated by the prompt solution hint information to obtain the solution strategy of the target question;
[0242] Input the target question and the solution strategy into the second classification model, classify the target question through the second classification model to obtain the target solution method.
[0243] The knowledge Q&A device provided in this embodiment belongs to the same inventive concept as the knowledge Q&A method provided in the above embodiments of the present application, can execute the methods provided in any of the above embodiments of the present application, and has the corresponding functional modules and beneficial effects of the executed methods. For the technical details not described in detail in this embodiment, reference may be made to the specific processing content of the knowledge Q&A method provided in the above embodiments of the present application, which will not be elaborated here.
[0244] The functions implemented by each unit in the above knowledge Q&A device can be realized by the same or different processors respectively, which is not limited in the embodiments of the present application.
[0245] It should be understood that each unit in the above device can be implemented in the form of a processor invoking software. For example, the device includes a processor, which is connected to a memory. Instructions are stored in the memory, and the processor invokes the instructions stored in the memory to implement any of the above methods or the functions of each unit of the device. The processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory inside the device or a memory outside the device. Alternatively, the units in the device can be implemented in the form of a hardware circuit. By designing the hardware circuit, the functions of some or all of the units can be realized. The hardware circuit can be understood as one or more processors. For example, in one implementation, the hardware circuit is an ASIC, and by designing the logical relationship of the components in the circuit, the functions of some or all of the above units are realized. Again, for example, in another implementation, the hardware circuit can be implemented by a PLD. Taking FPGA as an example, it can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured through a configuration file, so as to realize the functions of some or all of the above units. All units of the above device can be all implemented in the form of a processor invoking software, or all implemented in the form of a hardware circuit, or some implemented in the form of a processor invoking software, and the remaining part implemented in the form of a hardware circuit.
[0246] In the embodiments of the present application, the processor is a circuit with the ability to process signals. In one implementation, the processor can be a circuit with the ability to read and execute instructions, such as a CPU, a microprocessor, a GPU, or a DSP, etc. In another implementation, the processor can realize certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or can be reconstructed. For example, the processor is a hardware circuit implemented by an ASIC or a PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the configuration of the hardware circuit can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as a kind of ASIC, such as an NPU, a TPU, a DPU, etc.
[0247] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above methods, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.
[0248] In addition, all or part of the units in the above device can be integrated together or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of an SOC. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of the units of the device. The types of the at least one processor may be different, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.
[0249] Exemplary electronic device
[0250] Another embodiment of the present application further provides an electronic device. As shown in Figure 3 The device includes:
[0251] A memory 300 and a processor 310;
[0252] Wherein, the memory 300 is connected to the processor 310 for storing programs;
[0253] The processor 310 is configured to implement the knowledge question-answering method disclosed in any of the above embodiments by running the programs stored in the memory 300.
[0254] Specifically, the above knowledge question-answering device may further include: a bus, a communication interface 320, an input device 330, and an output device 340.
[0255] The processor 310, the memory 300, the communication interface 320, the input device 330, and the output device 340 are interconnected through the bus. Among them:
[0256] The bus may include a path for transmitting information between various components of the computer system.
[0257] The processor 310 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or may be an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0258] The processor 310 may include a main processor and may also include a baseband chip, a modem, etc.
[0259] The program for implementing the technical solution of the present invention is stored in the memory 300, and the operating system and other key services may also be stored. Specifically, the program may include program codes, and the program codes include computer operation instructions. More specifically, the memory 300 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk memory, a flash memory, etc.
[0260] The input device 330 may include devices for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor, etc.
[0261] The output device 340 may include devices for allowing information to be output to a user, such as a display screen, a printer, a speaker, etc.
[0262] The communication interface 320 may include devices of any transceiver type for communicating with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.
[0263] The processor 310 executes the program stored in the memory 300 and calls other devices, and can be used to implement each step of any one of the knowledge answering methods provided in the above embodiments of the present application.
[0264] Exemplary computer program product and storage medium
[0265] In addition to the above methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, and the computer program instructions, when run by a processor, cause the processor to execute the steps in the knowledge answering method according to various embodiments of the present application described in any of the above embodiments of this specification.
[0266] The computer program product may be written in any combination of one or more programming languages for writing program codes for performing the operations of the embodiments of the present application. The programming languages include object-oriented programming languages, such as Java, C++, etc., and also include conventional procedural programming languages, such as the "C" language or similar programming languages. The program codes may be executed entirely on a user computing device, partially on a user device, executed as an independent software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0267] In addition, an embodiment of the present application may also be a storage medium, on which a computer program is stored. The computer program is executed by a processor to perform the steps in the knowledge Q&A method according to various embodiments of the present application described in any of the above embodiments of this specification. Specifically, the following steps may be implemented:
[0268] Obtain a target question to be answered;
[0269] Determine the difficulty type of the target question, where the difficulty type includes simple questions and complex questions;
[0270] In the case where the target question is a complex question, determine a target solution method for the target question from multiple preset solution methods, where the preset solution methods include a multi-dimensional enumeration solution method, a progressive association reasoning solution method, and a hybrid solution method;
[0271] Answer the target question according to the target solution method to obtain answer information for the target question.
[0272] For the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps may be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0273] It should be noted that the embodiments in this specification are all described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0274] The steps in the methods of the embodiments of the present application can be adjusted, combined, and deleted according to actual needs. The technical features recorded in each embodiment can be replaced or combined.
[0275] The modules and sub-modules in the devices and terminals in the embodiments of the present application can be combined, divided, and deleted according to actual needs.
[0276] In several embodiments provided by the present application, it should be understood that the disclosed terminals, devices, and methods can be implemented in other ways. For example, the terminal embodiments described above are merely illustrative. For example, the division of modules or sub-modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple sub-modules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or modules can be in electrical, mechanical, or other forms.
[0277] The modules or sub-modules described as separate components may or may not be physically separated. The components as modules or sub-modules may or may not be physical modules or sub-modules, that is, they can be located in one place, or can be distributed to multiple network modules or sub-modules. Some or all of the modules or sub-modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0278] In addition, each functional module or sub-module in various embodiments of the present application can be integrated in a processing module, or each module or sub-module can exist physically alone, or two or more modules or sub-modules can be integrated in one module. The above-mentioned integrated modules or sub-modules can be implemented in the form of hardware, or can be implemented in the form of software functional modules or sub-modules.
[0279] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0280] The steps of the methods or algorithms described in combination with the embodiments disclosed in this article can be directly implemented by hardware, software units executed by a processor, or a combination of the two. The software units can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0281] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0282] 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 apparent to those skilled in the art, and the general principles defined herein may 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 conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A knowledge Q&A method, characterized in that, Including: Obtain a target question to be answered; Determine the difficulty type of the target question, where the difficulty type includes simple questions and complex questions; In the case where the target question is a complex question, determine a target solution method for the target question from multiple preset solution methods, where the preset solution methods include multi-dimensional enumeration solution method, progressive association reasoning solution method, and hybrid solution method; Answer the target question according to the target solution method to obtain answer information for the target question.
2. The method according to claim 1, wherein When the target solution method includes the multi-dimensional enumeration solution method, the answering the target question according to the target solution method to obtain the answer information for the target question includes: Decompose the target question to obtain multiple first sub-questions; Perform the following answering process for each of the first sub-questions: Determine a first knowledge fragment related to the first sub-question; Input the first sub-question and the first knowledge fragment into a target domain question-answering model for answering to obtain first sub-answer information for the first sub-question, where the target domain is the domain to which the target question belongs; Integrate the target question, the first sub-questions, and the first sub-answer information to obtain integrated data; Input the integrated data into the target domain question-answering model for answering to obtain the answer information.
3. The method according to claim 2, characterized in that, The decomposing the target question to obtain multiple first sub-questions includes: Obtain prompt decomposition prompt information, where the prompt decomposition prompt information is used to indicate a decomposition method; Decompose the target question according to the decomposition method indicated by the prompt decomposition prompt information through the target domain question-answering model to obtain the multiple first sub-questions.
4. The method according to claim 2, characterized in that Determining the first knowledge fragment related to the first sub-question includes: Retrieve candidate knowledge fragments related to the first sub-question from a pre-constructed target domain knowledge base; Determine the first preset number of candidate knowledge fragments with the strongest relevance to the first sub-question as the first knowledge fragment.
5. The method according to claim 1, wherein When the target solution method includes the progressive association reasoning solution method, the answering the target question according to the target solution method to obtain the answer information for the target question includes: Obtain prompt output prompt information, where the prompt output prompt information is used to indicate the data format of the data output by the target domain answering model; Input the target question and the prompt output prompt information into the target domain answering model for answering to obtain a first answering result; In the case where the data format of the first answering result indicates that it needs to be solved again, perform the following iterative process: Obtain a second sub-question in the first answering result, determine a second knowledge fragment corresponding to the second sub-question; Input the second sub-question and the second knowledge fragment into the target domain answering model for answering to obtain second sub-answer information; Input the first answering result and the second sub-answer information into the target domain answering model for answering to obtain a second answering result; In the case that the data format of the second answer result indicates that it needs to be solved again, update the first answer result to the second answer result and execute the iterative process again; In the case that the data format of the second answer result indicates that it does not need to be solved again, determine the second answer result as the answer information.
6. The method according to claim 1, wherein When the target solution method includes a hybrid solution method, answering the target question according to the target solution method to obtain the answer information of the target question includes: Decompose the target question to obtain a plurality of third sub-questions and the Q&A order of the third sub-questions; Determine the difficulty type of each of the third sub-questions in sequence according to the Q&A order; In the case that the third sub-question is a complex question, determine the specified solution method of the third sub-question from a plurality of preset solution methods, and answer the third sub-question according to the specified solution method to obtain the third sub-answer information of the third sub-question; In the case that the third sub-question is a simple question, answer the third sub-question through a target domain answer model to obtain the third sub-answer information; Input the target question, the Q&A order, and all the third sub-answer information into the target domain answer model for answering to obtain the answer information.
7. The method according to claim 1, wherein The determining the difficulty type of the target question includes: Input the target question into the first classification model, and classify the target question through the first classification model to obtain the difficulty type; The first classification model is obtained through difficulty classification training based on sample questions and the difficulty type annotations corresponding to the sample questions.
8. The method according to claim 1, wherein The determining the target solution method of the target question from a plurality of preset solution methods includes: Obtain prompt answer hint information, where the prompt answer hint information is used to indicate the solution idea of the target question; Analyze the target question through the target domain Q&A model according to the solution idea indicated by the prompt answer hint information to obtain the solution strategy of the target question; Input the target question and the solution strategy into the second classification model, and classify the target question through the second classification model to obtain the target solution method.
9. A knowledge Q&A device, characterized in that, including: An acquisition unit, configured to acquire a target question to be answered; A first determination unit, configured to determine the difficulty type of the target question, where the difficulty type includes simple questions and complex questions; A second determination unit, configured to, in the case that the target question is a complex question, determine the target solution method of the target question from a plurality of preset solution methods, where the preset solution methods include a multi-dimensional enumeration solution method, a progressive correlation reasoning solution method, and a hybrid solution method; An answering unit, configured to answer the target question according to the target solution method to obtain the answer information of the target question.
10. An electronic device, characterized in that, including a memory and a processor; The memory is connected to the processor and is used to store programs; The processor is configured to implement the knowledge Q&A method according to any one of claims 1 to 8 by running the program in the memory.
11. A storage medium, characterized in that, A computer program is stored on the storage medium, and when the computer program is run by the processor, the knowledge Q&A method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Method, device and equipment for generating reply, medium and product
CN120804268A